<div class="requirements index">
<h2><?php __('Liste des requirements');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('Id', 'r_index');?></th>
	<th><?php echo $paginator->sort('Référence', 'r_reference');?></th>
	<th><?php echo $paginator->sort('Titre', 'r_title');?></th>
	<th><?php echo $paginator->sort('Description', 'r_description');?></th>
	<th><?php echo $paginator->sort('Catégorie', 'r_category');?></th>
	<th><?php echo $paginator->sort('Applicabilité', 'r_applicability');?></th>
	<th><?php echo $paginator->sort('Conformité', 'r_conformance');?></th>
	<th><?php echo $paginator->sort('Notes', 'r_notes');?></th>
	<th><?php echo $paginator->sort('Statut', 'r_status');?></th>
	<th><?php echo $paginator->sort('Projet', 'r_project');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($requirements as $requirement):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $requirement['Requirement']['r_index']; ?>
		</td>
		<td>
			<?php echo $requirement['Requirement']['r_reference']; ?>
		</td>
		<td>
			<?php echo $requirement['Requirement']['r_title']; ?>
		</td>
		<td>
			<?php echo $requirement['Requirement']['r_description']; ?>
		</td>
		<td>
			<?php echo $html->link($requirement['Category']['cat_name'], array('controller'=> 'categories', 'action'=>'view', $requirement['Category']['cat_index'])); ?>
		</td>
		<td>
			<?php echo $html->link($requirement['Applicability']['app_description'], array('controller'=> 'applicabilities', 'action'=>'view', $requirement['Applicability']['app_index'])); ?>
		</td>
		<td>
			<?php echo $html->link($requirement['Conformance']['conf_description'], array('controller'=> 'conformances', 'action'=>'view', $requirement['Conformance']['conf_index'])); ?>
		</td>
		<td>
			<?php echo $requirement['Requirement']['r_notes']; ?>
		</td>
		<td>
			<?php echo $requirement['Requirement']['r_status']; ?>
		</td>
		<td>
			<?php echo $html->link($requirement['Project']['proj_name'], array('controller'=> 'projects', 'action'=>'view', $requirement['Project']['proj_index'])); ?>
		</td>
		<td class="actions">
			<?php echo $html->link('<img src="/ReqTrack/img/Voir.png" alt="Voir" title="Voir">', array('action'=>'view', $requirement['Requirement']['r_index']), null, null, false); ?>
			<?php echo $html->link('<img src="/ReqTrack/img/Modifier.png" alt="Modifier" title="Modifier">', array('action'=>'edit', $requirement['Requirement']['r_index']), null, null, false); ?>
			<?php echo $html->link('<img src="/ReqTrack/img/Supprimer.png" alt="Supprimer" title="Supprimer">', array('action'=>'delete', $requirement['Requirement']['r_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $requirement['Requirement']['r_index']), null, null, false); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Gérer '.$this->name, true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('Ajouter '.$this->name, true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('Autres actions', true), array('controller'=> 'summaries', 'action'=>'index')); ?> </li>
	</ul>
</div>
